package com.bajiao.entity.order;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * @Description: 订单表
 * @Author: FanJq
 * @Date:   2024-12-14
 * @Version: V1.0
 */
@Data
@TableName("tb_order")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="tb_order对象", description="订单表")
public class Order {

	/**主键*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键", required = true, position = 0)
	private String id;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
    @ApiModelProperty(value = "订单编号", required = true, position = 10)
	private String orderNo;
	/**用户id*/
	@Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id", required = true, position = 20)
	private String userId;
	/**店铺id*/
	@Excel(name = "店铺id", width = 15)
    @ApiModelProperty(value = "店铺id", required = true, position = 30)
	private String storeId;

	/**购买数量*/
	@Excel(name = "购买数量", width = 15)
    @ApiModelProperty(value = "购买数量", required = true, position = 80)
	private Integer buyNum;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额", required = true, position = 100)
	private BigDecimal discountAmount;
	/**商品总金额*/
	@Excel(name = "商品总金额", width = 15)
    @ApiModelProperty(value = "商品总金额", required = true, position = 110)
	private BigDecimal productAmount;
	/**订单总金额*/
	@Excel(name = "订单总金额", width = 15)
    @ApiModelProperty(value = "订单总金额", required = true, position = 120)
	private BigDecimal orderAmount;
	/**支付金额*/
	@Excel(name = "支付金额", width = 15)
    @ApiModelProperty(value = "支付金额", required = true, position = 130)
	private BigDecimal payPrice;
	/**支付方式 1-余额*/
	@Excel(name = "支付方式 1-余额 2-微信 3-组合支付", width = 15)
    @ApiModelProperty(value = "支付方式 1-余额 2-微信 3-组合支付", required = true, position = 140)
	private Integer payType;
	/**支付时间*/
	@Excel(name = "支付时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间", required = true, position = 150)
	private Date payTime;
	/**0-待支付 1-待使用 2-已使用 7-退款中 8-已退款 9-已取消*/
	@Excel(name = "0-待支付 1-待使用 2-已使用 7-退款中 8-已退款 9-已取消", width = 15)
    @ApiModelProperty(value = "0-待支付 1-待使用 2-已使用 7-退款中 8-已退款 9-已取消", required = true, position = 160)
	private Integer status;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", required = true, position = 170)
	private Date createTime;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", required = true, position = 180)
	private Date updateTime;
	/**核销码*/
	@Excel(name = "核销码", width = 15)
    @ApiModelProperty(value = "核销码", required = true, position = 190)
	private String verifyCode;
	/**核销时间*/
	@Excel(name = "核销时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "核销时间", required = true, position = 200)
	private Date verifyTime;
	@ApiModelProperty(value = "过期时间", required = true, position = 200)
	private Date expireTime;
	@ApiModelProperty(value = "订单备注")
	private String remark;
	@ApiModelProperty(value = "优惠规则标记")
	private Integer discountMark;
	@ApiModelProperty(value = "支付编号")
	private String payNo;
	@ApiModelProperty(value = "外部交易号")
	private String outTradeNo;
}
